Non-volatile memory systems typically manage memory by logically organizing the basic unit of physical erase (erase block) into composite logical groupings (metablocks or logical groups), where an erase block generally consists of a number of sectors. When an erase command is received, the specified sectors are checked against the memory system's control data. If the specified sectors span one or more full logical groups, the full logical group(s) can each be treated as a whole and erased according to one process (such as performing a true, physical erase), while other specified sectors that do not span a full logical group, are “logically” erased at the sector level by standard techniques. For flash EEPROM, the memory is electrically erasable either all at once or by one or more minimum erasable blocks at a time, where a minimum erasable block may consist of one or more sectors and each sector may store 512 bytes or more of data. An erase operation may take as much as an order of magnitude longer than read and program operations. Thus, it is desirable to have the erase block of substantial size. In this way, the erase time is amortized over a large aggregate of memory cells.
The nature of flash memory predicates that data can be written only to memory locations that have been erased. If data of a certain logical address from a host is to be updated, one way is to rewrite the update data in the same physical memory location. That is, the logical to physical address mapping is unchanged. However, this will mean the entire erase block that contains that physical memory location will have to be first erased and then rewritten with the updated data. This method of update is inefficient, as it requires an entire erase block to be erased and rewritten, especially if the data to be updated only occupies a small portion of the erase block. It will also result in a higher frequency of erase recycling of the memory block, which is undesirable in view of the limited endurance of this type of memory device.
In EEPROM memory, as well as in other forms of non-volatile memory, the memory cells need to be erased before they can be rewritten to with new data content. When the data in a portion of the memory becomes obsolete, or the memory device receives a command to erase a particular portion, in more advanced memory systems it is common for the designated portions not to be erased immediately at that time, but to be “logically erased” by being marked for erase, with the actual, physical erase taking place at a later time. This may be done for a number of reasons. As noted above, an erase process typically takes quite a bit longer than a simple write. The write is also often simpler to execute. Thus, when a data portion becomes obsolete or is chosen for erase, the memory system will instead write a data pattern to the memory portion, set a flag, or otherwise designate it as erased. Once the memory system has time, or is in need of additional erased sectors, the “logically erased” portion can then be physically erased when convenient, for example in a background process. It may also be the case that the portion of the memory to be erased is less than the minimum unit of erase for the memory. For example, a flash memory could receive a command to erase a sector of data. However, flash memories are commonly formed such that the basic physical unit of erase is a block, typically composed of multiple sectors. These erase blocks are then usually combined into composite logical structures, such as metablocks or other logical groups, which the controller then treats as a basic unit for memory management. As multiple sectors are grouped together in erase blocks, metablocks and/or other logical groupings, erasing a single sector by itself is not usually possible, as this would also erase the rest of the corresponding meta-block or larger logical structure.